<?php
namespace app\api\controller\yluser;
use x\G;
class Page extends Base{

    public function __construct() {
        parent::__construct();
    }
    //协议
    public function agreement(){
        $d = $this->post;
        $rule = [];
        $msg = [];
        check($rule,$msg,$d);

        switch ($d['type']) {
            case 0: #注册协议
                $id = 2;
                break;
            case 1:  #自动提现协议
                $id = 1;
                break;
            default:
                $id = 2;
                break;
        }
        $rs = $this->db->find('page',$id);
        $data = $rs['ext'];
        if (in_array(G::$exts['partner'], [5100,5200])) {
            $data = url('h5/agreement',['id'=>$id]);
        }
        suc($data);
    }

}
?>
